<?php


namespace app\validate;


use think\Validate;

class Admin extends Validate
{
    protected $rule = [
        'username' => 'require|min:4|max:25',
        'password' => 'require|min:4|max:32',
    ];

    protected $message = [
        'username.require' => '用户名为空',
        'username.min' => '名称最多不能少于4个字符',
        'username.max' => '名称最多不能超过25个字符',
        'password.require' => '用户名为空',
        'password.min' => '名称最多不能少于4个字符',
        'password.max' => '名称最多不能超过32个字符',
    ];

    protected $scene = [
        'login' => ['username', 'password'],
    ];
}